package com.doit.shark.crawler.demo;/**
 * Created by hunter.coder 涛哥
 * 2019/4/15 15:24
 * 交流qq:657270652
 * Version: 1.0
 * 更多学习资料：https://blog.csdn.net/coderblack/
 * Description:
 **/

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;

/**
 * @Author hunter.coder
 * @Date 2019/4/15 15:24
 * @Version 1.0
 * @Description Jsoup demo示例程序
 **/
public class demo {

    public static void main(String[] args) throws Exception {

        Connection conn = Jsoup.connect("https://item.jd.com/100002852992.html");
        Document doc = conn.get();

        Elements elements = doc.select(".sku-name");

        for (Element element : elements) {
            System.out.println(element.text());
        }



    }


}
